package com.hexacta.hrs.web.struts.actions.feedbacks;

import org.vectrics.employee.Employee;

public class ManageFeedbacksFilters {

	private Long selectedProjectId;
	
	private String selectedProjectName;
	
	private Long selectedEmployeeId;

	private String selectedEmployeeName;

	private String selectedRoleId;

	private String selectedRoleName;

	private Long selectedEvaluatorId;

	private String selectedEvaluatorName;

	private Long selectedMentorId;

	private String selectedMentorName;
	
	public Long getSelectedProjectId() {
		if ((getSelectedProjectName()!=null)&&(!getSelectedProjectName().trim().equals(""))){
			return selectedProjectId;	
		} else {
			return null;
		}
	}

	public void setSelectedProjectId(Long selectedProjectId) {
		this.selectedProjectId = selectedProjectId;
	}
	
	public String getSelectedProjectName() {
		return selectedProjectName;
	}

	public void setSelectedProjectName(String selectedProjectName) {
		this.selectedProjectName = selectedProjectName;
	}

	public Long getSelectedEmployeeId() {
		if ((getSelectedEmployeeName()!=null)&&(!getSelectedEmployeeName().trim().equals(""))) {
			return selectedEmployeeId;
		} else {
			return null;
		}
		
	}

	public void setSelectedEmployeeId(Long selectedEmployeeId) {
		this.selectedEmployeeId = selectedEmployeeId;
	}

	public String getSelectedEmployeeName() {
		return selectedEmployeeName;
	}

	public void setSelectedEmployeeName(String selectedEmployeeName) {
		this.selectedEmployeeName = selectedEmployeeName;
	}

	public String getSelectedRoleId() {
		if ((getSelectedRoleName()!=null)&&(!getSelectedRoleName().trim().equals(""))) {
			return selectedRoleId;
		} else {
			return null;
		}
	}

	public void setSelectedRoleId(String selectedRoleId) {
		this.selectedRoleId = selectedRoleId;
	}

	public String getSelectedRoleName() {
		return selectedRoleName;
	}

	public void setSelectedRoleName(String selectedRoleName) {
		this.selectedRoleName = selectedRoleName;
	}

	public Long getSelectedMentorId() {
		if ((getSelectedMentorName()!=null) && (!getSelectedMentorName().trim().equals(""))) {
			return selectedMentorId;
		} else {
			return null;
		}
		
	}

	public void setSelectedMentorId(Long selectedMentorId) {
		this.selectedMentorId = selectedMentorId;
	}

	public String getSelectedMentorName() {
		return selectedMentorName;
	}

	public void setSelectedMentorName(String selectedMentorName) {
		this.selectedMentorName = selectedMentorName;
	}
	
	public Long getSelectedEvaluatorId() {
		if ((getSelectedEvaluatorName()!=null) && (!getSelectedEvaluatorName().trim().equals(""))) {
			return selectedEvaluatorId;	
		}else{
			return null;
		}
		
	}

	public void setSelectedEvaluatorId(Long selectedEvaluatorId) {
		this.selectedEvaluatorId = selectedEvaluatorId;
	}

	public String getSelectedEvaluatorName() {
		return selectedEvaluatorName;
	}

	public void setSelectedEvaluatorName(String selectedEvaluatorName) {
		this.selectedEvaluatorName = selectedEvaluatorName;
	}
	
	public ManageFeedbacksFilters() {
		this.setSelectedEmployeeName("");
		this.setSelectedEvaluatorName("");
		this.setSelectedRoleName("");
		this.setSelectedMentorName("");
		this.setSelectedProjectName("");
		
		this.setSelectedEmployeeId(null);
		this.setSelectedEvaluatorId(null);
		this.setSelectedRoleId(null);
		this.setSelectedMentorId(null);
		this.setSelectedProjectId(null);
	}
	
	public ManageFeedbacksFilters(Employee evaluator) {
		this.setSelectedEmployeeName("");
		this.setSelectedEvaluatorName(evaluator.getPerson().getName());
		this.setSelectedRoleName("");
		this.setSelectedMentorName("");
		this.setSelectedProjectName("");
		
		
		this.setSelectedEmployeeId(null);
		this.setSelectedEvaluatorId(evaluator.getId());
		this.setSelectedRoleId(null);
		this.setSelectedMentorId(null);
		this.setSelectedProjectId(null);
	}
}
